import request from '@/utils/request'

// 查询库龄f分析规则列表
export function listKuling(query) {
  return request({
    url: '/wm/kuling/list',
    method: 'get',
    params: query
  })
}

// 查询库龄f分析规则详细
export function getKuling(id) {
  return request({
    url: '/wm/kuling/' + id,
    method: 'get'
  })
}

// 新增库龄f分析规则
export function addKuling(data) {
  return request({
    url: '/wm/kuling',
    method: 'post',
    data: data
  })
}

// 修改库龄f分析规则
export function updateKuling(data) {
  return request({
    url: '/wm/kuling',
    method: 'put',
    data: data
  })
}

// 删除库龄f分析规则
export function delKuling(id) {
  return request({
    url: '/wm/kuling/' + id,
    method: 'delete'
  })
}
// 查询库龄数据
export function stockAgeAnalysis(query) {
  return request({
    url: '/wm/kuling/stockAgeAnalysis',
    method: 'get',
    params: query
  })
}
